<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
    <link rel="stylesheet" href="css/index.css">
    <script src="js/jquery.1.11.1.min.js"></script>
    <style>

    </style>

</head>
<body>
<div class="register_head_on">

</div>
<div class="register_head">
    <a href="index.html"><img src="img/logo.jpg" alt=""></a>
    <div class="register_head_right">
        <p class="register_head_right_p1">小 米 商 城</p>
        <p class="register_head_right_p2">让每个人都享受科技乐趣</p>
    </div>

</div>

<div class="register">
    <div class="register_boby">
        <div class="register_boby_min">
            <div class="register_boby_no1">
                <div class="register_boby_no1_in">
                    <span id="accountLoginTab" style="color: #ff6700; cursor: pointer;">账号登录 </span>
                    <span class="register_boby_sapn"> | </span>
                    <span id="scanLoginTab" style="cursor: pointer;"> 扫码登录</span>
                </div>
                <div id="scanLoginOptions" style="margin-top: 20px; text-align: center; display: none;">
                    <div style="display: inline-block; margin: 0 15px; cursor: pointer;">
                        <p style="font-size: 16px; color: #333; font-weight: bold;">快捷扫码登录</p>
                    </div>
                </div>
            </div>
            <div class="register_boby_no2">
                <input type="text" placeholder="邮箱/手机号码/小米ID">
                <input type="password" placeholder="密码">
                <div class="register_boby_no2_div">
                    <span>登录</span>
                </div>
            </div>
            <script>
                document.getElementById('accountLoginTab').addEventListener('click', function() {
                    this.style.color = '#ff6700';
                    document.getElementById('scanLoginTab').style.color = '';
                    document.getElementById('scanLoginOptions').style.display = 'none';
                    document.querySelector('.register_boby_no2').style.display = 'block';
                });
                
                document.getElementById('scanLoginTab').addEventListener('click', function() {
                    this.style.color = '#ff6700';
                    document.getElementById('accountLoginTab').style.color = '';
                    document.getElementById('scanLoginOptions').style.display = 'block';
                    document.querySelector('.register_boby_no2').style.display = 'none';
                });

                // 添加登录按钮点击事件
                document.querySelector('.register_boby_no2_div span').addEventListener('click', function() {
                    var username = document.querySelector('.register_boby_no2 input[type="text"]').value;
                    var password = document.querySelector('.register_boby_no2 input[type="password"]').value;
                    
                    if(username && password) {
                        alert('登录成功！');
                        setTimeout(function() {
                            window.location.href = 'index.html';
                        }, 1000);
                    } else {
                        alert('请输入用户名和密码');
                    }
                });
            </script>
            <div class="register_boby_no3">
                <a href="javascript:void(0);" style="color: #ff6700">手机短信登录/注册</a>
                <sapn class="register_boby_no3_span">
                    <a href="avascript:void(0);">立即注册</a>
                    <span>|</span>
                    <a href="avascript:void(0);">忘记密码?</a>
                </sapn>

            </div>
            <div class="register_boby_no4">
                <a href="login.html"><img src="img/register02.jpg" alt=""></a>
            </div>



        </div>
    </div>
</div>
<div class="register_foot">
    <img  src="img/register03.jpg" alt="">
</div>


</body>
</html>